Skip to content

fix(a11y): make sidebar toggle keyboard focusable#3116

Closed
leno23 wants to merge 1 commit into
rust-lang:masterfrom
leno23:fix/sidebar-toggle-keyboard-2615
Closed

fix(a11y): make sidebar toggle keyboard focusable#3116
leno23 wants to merge 1 commit into
rust-lang:masterfrom
leno23:fix/sidebar-toggle-keyboard-2615

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • Replace the sidebar hamburger <label for="checkbox"> with a <button type="button">
  • Toggle the hidden checkbox from JavaScript and dispatch change so existing sidebar logic is unchanged
  • Keyboard users can now Tab to the control and activate it with Enter/Space

Motivation

The label-based toggle was not in the tab order, so keyboard and screen-reader users skipped the first menu control (#2615).

Test plan

  • cargo test --test testsuite
  • GUI sidebar.goml (CI)

Fixes #2615

Made with Cursor

Replace the sidebar hamburger <label> with a <button> so keyboard
users can Tab to it and activate it with Enter/Space. Toggle the
hidden checkbox from JavaScript and dispatch change for existing
sidebar show/hide logic.

Fixes rust-lang#2615

Co-authored-by: Cursor <cursoragent@cursor.com>
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 17, 2026
@ehuss ehuss closed this May 23, 2026
@rustbot rustbot removed the S-waiting-on-review Status: waiting on a review label May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility: "Toggle Table of Content" hamburger menu is not keyboard focusable

3 participants